window.onload=function(){	
/*----------------------导航栏start----------------*/
	
	$("#menu").click(function(){
		$("#nav").toggle();
	})                 //移动端导航栏
	
$(".choose").click(function(){
	var nums=this.getAttribute("index");
		$("#nav").find("div[index="+nums+"]").toggle();
	
})
	var choose=document.getElementsByClassName("choose");
	var showindex=document.getElementsByClassName("up");
	var showindex=document.getElementById("nav").getElementsByTagName("div");
	
	for(var i=0;i<7;i++){
	choose[i].onmouseover=function(){		
		var nums=this.getAttribute("index");
		showindex[nums].style.display="block";
	}
	choose[6].onmouseover=function(){
		showindex[4].style.display="block";
	}
	
	choose[i].onmouseout=function(){		
		var nums=this.getAttribute("index");
			showindex[nums].style.display="none";
	}	
	choose[6].onmouseout=function(){
		showindex[4].style.display="none";
	}
	showindex[i].onmouseover=function(){
		this.style.display="block";
	}
	showindex[i].onmouseout=function(){
		this.style.display="none";
	}
	}
	


}

